OnUse will run the contents when the player clicks while holding the item. You can find all these parameters below.
Right now it only works on minecraft:carrot_on_a_stick item. In the future you will be able to use any/all items.
| Name |
Type |
Default Value |
Description |
| add_mob_effect |
JSON OBJECT |
|
Will give the target the selected effect(s).
| Name |
Type |
Default Value |
Description |
| target |
String |
|
The target context to execute against. |
| effect |
String |
|
The minecraft effect. |
| showIcon |
Boolean |
TRUE |
Show particles/icon. |
|
| remove_mob_effect
|
JSON OBJECT |
|
Will remove the target the selected effect(s).
| Name |
Type |
Description |
| target |
String |
The target context to execute against. |
| effect |
String |
The minecraft effect. |
|
| die |
JSON OBJECT |
|
Will kill the target.
| Name |
Type |
Description |
| target |
String |
The target context to execute against. |
|
| transform_item |
JSON OBJECT |
|
replace the curent holding item with the new
determined
item.
| Name |
Type |
Description |
| transform |
String |
The item that will be replaced with. |
|
| replaceitem |
JSON OBJECT |
|
This will copy and move the item to the new selected
Slot.
| Name |
Type |
Default Value |
Description |
| slot |
String |
|
This is the slot the item will end up in. |
| replace |
Boolean |
TRUE |
If false it will check to see if their already is an item in that slot. |
|
| merge_data |
JSON OBJECT |
|
Will apply the data.
| Name |
Type |
Description |
| CustomModelData |
JSON OBJECT |
Replaces CustomModelData tag with value.
| Name |
Type |
Description |
| value |
Integer |
Value it will replace. |
|
| Damage |
JSON OBJECT |
Replaces Damage tag with value.
| Name |
Type |
Description |
| value |
Integer |
Value it will replace. |
|
| HideFlags |
JSON OBJECT |
Replaces HideFlags tag with value.
| Name |
Type |
Description |
| value |
Integer |
Value it will replace. |
|
| Unbreakable |
JSON OBJECT |
Replaces Unbreakable tag with value.
| Name |
Type |
Description |
| value |
Integer |
Value it will replace. |
|
|
| show_text |
JSON OBJECT |
|
text releated objects.
| Name |
Type |
Description |
| clear |
JSON OBJECT |
clears title, subtitle, and actionbar.
| Name |
Type |
Description |
| target |
String |
The target context to execute against. |
|
| say |
JSON OBJECT |
clears title, subtitle, and actionbar.
| Name |
Type |
Description |
| text |
String |
The message to display. |
|
| tellraw |
JSON OBJECT |
clears title, subtitle, and actionbar.
| Name |
Type |
Description |
| target |
String |
The target context to execute against. |
| raw_text |
String |
The JSON Formatted text to show. |
|
| title |
JSON OBJECT |
clears title, subtitle, and actionbar.
| Name |
Type |
Description |
| target |
String |
The target context to execute against. |
| raw_text |
String |
The JSON Formatted text to show. |
|
| subtitle |
JSON OBJECT |
clears title, subtitle, and actionbar.
| Name |
Type |
Description |
| target |
String |
The target context to execute against. |
| raw_text |
String |
The JSON Formatted text to show. |
|
| actionbar |
JSON OBJECT |
clears title, subtitle, and actionbar.
| Name |
Type |
Description |
| target |
String |
The target context to execute against. |
| raw_text |
String |
The JSON Formatted text to show. |
|
|
| decrement_stack |
JSON OBJECT |
|
Will remove the selected item/weapon.main hand.
| Name |
Type |
Description |
| gamemode |
Array |
A list of gamemodes that will remove the item. Put "all" for all gamemodes. |
|
| play_sound |
JSON OBJECT |
|
Will play the sound when the item is used.
| Name |
Type |
Description |
| target |
String |
The target context to execute against. |
| sound |
String |
The sound to play. Only some are currently supported |
|
| score |
JSON OBJECT |
|
add, remove, set scores on a scoreboard.
| Name |
Type |
Description |
| add |
JSON OBJECT |
adds score.
| Name |
Type |
Description |
| name |
String |
The target context to execute against. |
| objective |
String |
Objective. Must be "score.test#" 0-9. |
| amount |
Integer |
How much to add to score. |
|
| set |
JSON OBJECT |
sets score.
| Name |
Type |
Description |
| name |
String |
The target context to execute against. |
| objective |
String |
Objective. Must be "score.test#" 0-9. |
| amount |
Integer |
What to set the score to |
|
| remove |
JSON OBJECT |
removes score.
| Name |
Type |
Description |
| name |
String |
The target context to execute against. |
| objective |
String |
Objective. Must be "score.test#" 0-9. |
| amount |
Integer |
How much to remove from the score. |
|
|
| damage |
JSON OBJECT |
|
Will damage the target.
| Name |
Type |
Description |
| target |
String |
The target context to execute against. |
| type |
String |
The way to apply the damage: "EFFECT", "ARROW". |
| amount |
Integer |
How many half hearts to apply to target. |
|
| reload |
JSON OBJECT |
|
Will reload the server. If it is a modded server
(Spigot, Bukkit, Paper) it will run /reload confirm.
| Name |
Type |
Default Value |
Description |
| confirm |
Boolean |
FALSE |
Must be set to true for it to reload server. |
|
| random |
JSON OBJECT |
|
Will output a random number from the min and max numbers.
| Name |
Type |
Description |
| min |
Integer |
The minium number to use. Must be less than max. |
| max |
Integer |
The maxium number to use. Must be more than min. |
| result |
Integer |
This is the output. (SelectedItem.tag.onUse.random.result) |
|
| summon |
JSON OBJECT |
|
Summon an entity with optional nbt data.
| Name |
Type |
Description |
| placement |
String |
How to place the entity. This may change. Valid strings: "ON_PLAYER","ON_BLOCK" |
| entity |
String |
The entity to summon. |
| nbt |
Array |
(Optional) nbt that the entity has. |
|